<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680936161"><span id="local-6989586621680936162"></span></span><span class="hs-comment">-- | An architecture independent description of a register.</span><span>
</span><span id="line-2"></span><span class="hs-comment">--      This needs to stay architecture independent because it is used</span><span>
</span><span id="line-3"></span><span class="hs-comment">--      by NCGMonad and the register allocators, which are shared</span><span>
</span><span id="line-4"></span><span class="hs-comment">--      by all architectures.</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Platform.Reg</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-7"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier">RegNo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier">Reg</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#regPair"><span class="hs-identifier">regPair</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier">regSingle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#realRegSingle"><span class="hs-identifier">realRegSingle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#isRealReg"><span class="hs-identifier">isRealReg</span></a></span><span class="hs-special">,</span><span>      </span><span class="annot"><a href="GHC.Platform.Reg.html#takeRealReg"><span class="hs-identifier">takeRealReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#isVirtualReg"><span class="hs-identifier">isVirtualReg</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><a href="GHC.Platform.Reg.html#takeVirtualReg"><span class="hs-identifier">takeVirtualReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier">VirtualReg</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#renameVirtualReg"><span class="hs-identifier">renameVirtualReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#classOfVirtualReg"><span class="hs-identifier">classOfVirtualReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#getHiVirtualRegFromLo"><span class="hs-identifier">getHiVirtualRegFromLo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#getHiVRegFromLo"><span class="hs-identifier">getHiVRegFromLo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier">RealReg</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#regNosOfRealReg"><span class="hs-identifier">regNosOfRealReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#realRegsAlias"><span class="hs-identifier">realRegsAlias</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#liftPatchFnToRegReg"><span class="hs-identifier">liftPatchFnToRegReg</span></a></span><span>
</span><span id="line-26"></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">where</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html"><span class="hs-identifier">GHC.Platform.Reg.Class</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#intersect"><span class="hs-identifier">intersect</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">-- | An identifier for a primitive real machine register.</span><span>
</span><span id="line-38"></span><span class="hs-keyword">type</span><span> </span><span id="RegNo"><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-var">RegNo</span></a></span></span><span>
</span><span id="line-39"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">-- VirtualRegs are virtual registers.  The register allocator will</span><span>
</span><span id="line-42"></span><span class="hs-comment">--      eventually have to map them into RealRegs, or into spill slots.</span><span>
</span><span id="line-43"></span><span class="hs-comment">--</span><span>
</span><span id="line-44"></span><span class="hs-comment">--      VirtualRegs are allocated on the fly, usually to represent a single</span><span>
</span><span id="line-45"></span><span class="hs-comment">--      value in the abstract assembly code (i.e. dynamic registers are</span><span>
</span><span id="line-46"></span><span class="hs-comment">--      usually single assignment).</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">--      The  single assignment restriction isn't necessary to get correct code,</span><span>
</span><span id="line-49"></span><span class="hs-comment">--      although a better register allocation will result if single</span><span>
</span><span id="line-50"></span><span class="hs-comment">--      assignment is used -- because the allocator maps a VirtualReg into</span><span>
</span><span id="line-51"></span><span class="hs-comment">--      a single RealReg, even if the VirtualReg has multiple live ranges.</span><span>
</span><span id="line-52"></span><span class="hs-comment">--</span><span>
</span><span id="line-53"></span><span class="hs-comment">--      Virtual regs can be of either class, so that info is attached.</span><span>
</span><span id="line-54"></span><span class="hs-comment">--</span><span>
</span><span id="line-55"></span><span class="hs-keyword">data</span><span> </span><span id="VirtualReg"><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-var">VirtualReg</span></a></span></span><span>
</span><span id="line-56"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="VirtualRegI"><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-var">VirtualRegI</span></a></span></span><span>  </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-57"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="VirtualRegHi"><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-var">VirtualRegHi</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>  </span><span class="hs-comment">-- High part of 2-word register</span><span>
</span><span id="line-58"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="VirtualRegF"><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-var">VirtualRegF</span></a></span></span><span>  </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-59"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="VirtualRegD"><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-var">VirtualRegD</span></a></span></span><span>  </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680936129"><span id="local-6989586621680936136"><span class="annot"><span class="annottext">VirtualReg -&gt; VirtualReg -&gt; Bool
(VirtualReg -&gt; VirtualReg -&gt; Bool)
-&gt; (VirtualReg -&gt; VirtualReg -&gt; Bool) -&gt; Eq VirtualReg
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: VirtualReg -&gt; VirtualReg -&gt; Bool
$c/= :: VirtualReg -&gt; VirtualReg -&gt; Bool
== :: VirtualReg -&gt; VirtualReg -&gt; Bool
$c== :: VirtualReg -&gt; VirtualReg -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680936112"><span id="local-6989586621680936114"><span id="local-6989586621680936126"><span class="annot"><span class="annottext">RegNo -&gt; VirtualReg -&gt; ShowS
[VirtualReg] -&gt; ShowS
VirtualReg -&gt; String
(RegNo -&gt; VirtualReg -&gt; ShowS)
-&gt; (VirtualReg -&gt; String)
-&gt; ([VirtualReg] -&gt; ShowS)
-&gt; Show VirtualReg
forall a.
(RegNo -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [VirtualReg] -&gt; ShowS
$cshowList :: [VirtualReg] -&gt; ShowS
show :: VirtualReg -&gt; String
$cshow :: VirtualReg -&gt; String
showsPrec :: RegNo -&gt; VirtualReg -&gt; ShowS
$cshowsPrec :: RegNo -&gt; VirtualReg -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-comment">-- This is laborious, but necessary. We can't derive Ord because</span><span>
</span><span id="line-64"></span><span class="hs-comment">-- Unique doesn't have an Ord instance. Note nonDetCmpUnique in the</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- implementation. See Note [No Ord for Unique]</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- This is non-deterministic but we do not currently support deterministic</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- code-generation. See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-68"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680936096"><span id="local-6989586621680936098"><span id="local-6989586621680936100"><span id="local-6989586621680936102"><span id="local-6989586621680936104"><span id="local-6989586621680936106"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>  </span><span id="local-6989586621680936094"><span class="annot"><span class="annottext">compare :: VirtualReg -&gt; VirtualReg -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span> </span><span id="local-6989586621680936092"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936092"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span> </span><span id="local-6989586621680936091"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936091"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936092"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936091"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-70"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span> </span><span id="local-6989586621680936089"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936089"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span> </span><span id="local-6989586621680936088"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936088"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936089"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936088"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-71"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span> </span><span id="local-6989586621680936087"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936087"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span> </span><span id="local-6989586621680936086"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936086"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936087"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936086"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-72"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span> </span><span id="local-6989586621680936085"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936085"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span> </span><span id="local-6989586621680936084"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936084"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936085"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936084"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-75"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-76"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-78"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-79"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-84"></span><span>        </span><span id="local-6989586621680936080"><span class="annot"><span class="annottext">getUnique :: VirtualReg -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680936078"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936078"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-85"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936078"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-86"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span> </span><span id="local-6989586621680936077"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936077"><span class="hs-identifier hs-var">u</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936077"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-87"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span> </span><span id="local-6989586621680936076"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936076"><span class="hs-identifier hs-var">u</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936076"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-88"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span> </span><span id="local-6989586621680936075"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936075"><span class="hs-identifier hs-var">u</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936075"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-89"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span> </span><span id="local-6989586621680936074"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936074"><span class="hs-identifier hs-var">u</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936074"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680936071"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-92"></span><span>        </span><span id="local-6989586621680936069"><span class="annot"><span class="annottext">ppr :: VirtualReg -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680936067"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936067"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-93"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936067"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-94"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span>  </span><span id="local-6989586621680936066"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936066"><span class="hs-identifier hs-var">u</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%vI_&quot;</span></span><span>   </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936066"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-95"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span> </span><span id="local-6989586621680936062"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936062"><span class="hs-identifier hs-var">u</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%vHi_&quot;</span></span><span>  </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936062"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-96"></span><span>                </span><span class="hs-comment">-- this code is kinda wrong on x86</span><span>
</span><span id="line-97"></span><span>                </span><span class="hs-comment">-- because float and double occupy the same register set</span><span>
</span><span id="line-98"></span><span>                </span><span class="hs-comment">-- namely SSE2 register xmm0 .. xmm15</span><span>
</span><span id="line-99"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span>  </span><span id="local-6989586621680936061"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936061"><span class="hs-identifier hs-var">u</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%vFloat_&quot;</span></span><span>   </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936061"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-100"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span>  </span><span id="local-6989586621680936060"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936060"><span class="hs-identifier hs-var">u</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%vDouble_&quot;</span></span><span>   </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936060"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="annot"><a href="GHC.Platform.Reg.html#renameVirtualReg"><span class="hs-identifier hs-type">renameVirtualReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-105"></span><span id="renameVirtualReg"><span class="annot"><span class="annottext">renameVirtualReg :: Unique -&gt; VirtualReg -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#renameVirtualReg"><span class="hs-identifier hs-var hs-var">renameVirtualReg</span></a></span></span><span> </span><span id="local-6989586621680936059"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936059"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621680936058"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936058"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-106"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936058"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-107"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-var">VirtualRegI</span></a></span><span>  </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936059"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-var">VirtualRegHi</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936059"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-109"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-var">VirtualRegF</span></a></span><span>  </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936059"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-110"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-var">VirtualRegD</span></a></span><span>  </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936059"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="GHC.Platform.Reg.html#classOfVirtualReg"><span class="hs-identifier hs-type">classOfVirtualReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span>
</span><span id="line-114"></span><span id="classOfVirtualReg"><span class="annot"><span class="annottext">classOfVirtualReg :: VirtualReg -&gt; RegClass
</span><a href="GHC.Platform.Reg.html#classOfVirtualReg"><span class="hs-identifier hs-var hs-var">classOfVirtualReg</span></a></span></span><span> </span><span id="local-6989586621680936057"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936057"><span class="hs-identifier hs-var">vr</span></a></span></span><span>
</span><span id="line-115"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936057"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-116"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-117"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-118"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcFloat"><span class="hs-identifier hs-var">RcFloat</span></a></span><span>
</span><span id="line-119"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- Determine the upper-half vreg for a 64-bit quantity on a 32-bit platform</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- when supplied with the vreg for the lower-half of the quantity.</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- (NB. Not reversible).</span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.Platform.Reg.html#getHiVirtualRegFromLo"><span class="hs-identifier hs-type">getHiVirtualRegFromLo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-127"></span><span id="getHiVirtualRegFromLo"><span class="annot"><span class="annottext">getHiVirtualRegFromLo :: VirtualReg -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#getHiVirtualRegFromLo"><span class="hs-identifier hs-var hs-var">getHiVirtualRegFromLo</span></a></span></span><span> </span><span id="local-6989586621680936053"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936053"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-128"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936053"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-comment">-- makes a pseudo-unique with tag 'H'</span><span>
</span><span id="line-130"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span> </span><span id="local-6989586621680936052"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936052"><span class="hs-identifier hs-var">u</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-var">VirtualRegHi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; Char -&gt; Unique
</span><a href="GHC.Types.Unique.html#newTagUnique"><span class="hs-identifier hs-var">newTagUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680936052"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'H'</span></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; VirtualReg
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Reg.getHiVirtualRegFromLo&quot;</span></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.Platform.Reg.html#getHiVRegFromLo"><span class="hs-identifier hs-type">getHiVRegFromLo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-134"></span><span id="getHiVRegFromLo"><span class="annot"><span class="annottext">getHiVRegFromLo :: Reg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#getHiVRegFromLo"><span class="hs-identifier hs-var hs-var">getHiVRegFromLo</span></a></span></span><span> </span><span id="local-6989586621680936049"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680936049"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-135"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680936049"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-136"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span>  </span><span id="local-6989586621680936047"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936047"><span class="hs-identifier hs-var">vr</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VirtualReg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-var">RegVirtual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VirtualReg -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#getHiVirtualRegFromLo"><span class="hs-identifier hs-var">getHiVirtualRegFromLo</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680936047"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Reg
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Reg.getHiVRegFromLo&quot;</span></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">------------------------------------------------------------------------------------</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- | RealRegs are machine regs which are available for allocation, in</span><span>
</span><span id="line-142"></span><span class="hs-comment">--      the usual way.  We know what class they are, because that's part of</span><span>
</span><span id="line-143"></span><span class="hs-comment">--      the processor's architecture.</span><span>
</span><span id="line-144"></span><span class="hs-comment">--</span><span>
</span><span id="line-145"></span><span class="hs-comment">--      RealRegPairs are pairs of real registers that are allocated together</span><span>
</span><span id="line-146"></span><span class="hs-comment">--      to hold a larger value, such as with Double regs on SPARC.</span><span>
</span><span id="line-147"></span><span class="hs-comment">--</span><span>
</span><span id="line-148"></span><span class="hs-keyword">data</span><span> </span><span id="RealReg"><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-var">RealReg</span></a></span></span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="RealRegSingle"><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-var">RealRegSingle</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RealRegPair"><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-var">RealRegPair</span></a></span></span><span>   </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680936037"><span id="local-6989586621680936042"><span class="annot"><span class="annottext">RealReg -&gt; RealReg -&gt; Bool
(RealReg -&gt; RealReg -&gt; Bool)
-&gt; (RealReg -&gt; RealReg -&gt; Bool) -&gt; Eq RealReg
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: RealReg -&gt; RealReg -&gt; Bool
$c/= :: RealReg -&gt; RealReg -&gt; Bool
== :: RealReg -&gt; RealReg -&gt; Bool
$c== :: RealReg -&gt; RealReg -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680936025"><span id="local-6989586621680936027"><span id="local-6989586621680936035"><span class="annot"><span class="annottext">RegNo -&gt; RealReg -&gt; ShowS
[RealReg] -&gt; ShowS
RealReg -&gt; String
(RegNo -&gt; RealReg -&gt; ShowS)
-&gt; (RealReg -&gt; String) -&gt; ([RealReg] -&gt; ShowS) -&gt; Show RealReg
forall a.
(RegNo -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [RealReg] -&gt; ShowS
$cshowList :: [RealReg] -&gt; ShowS
show :: RealReg -&gt; String
$cshow :: RealReg -&gt; String
showsPrec :: RegNo -&gt; RealReg -&gt; ShowS
$cshowsPrec :: RegNo -&gt; RealReg -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680936000"><span id="local-6989586621680936002"><span id="local-6989586621680936005"><span id="local-6989586621680936008"><span id="local-6989586621680936011"><span id="local-6989586621680936016"><span id="local-6989586621680936021"><span class="annot"><span class="annottext">Eq RealReg
Eq RealReg
-&gt; (RealReg -&gt; RealReg -&gt; Ordering)
-&gt; (RealReg -&gt; RealReg -&gt; Bool)
-&gt; (RealReg -&gt; RealReg -&gt; Bool)
-&gt; (RealReg -&gt; RealReg -&gt; Bool)
-&gt; (RealReg -&gt; RealReg -&gt; Bool)
-&gt; (RealReg -&gt; RealReg -&gt; RealReg)
-&gt; (RealReg -&gt; RealReg -&gt; RealReg)
-&gt; Ord RealReg
RealReg -&gt; RealReg -&gt; Bool
RealReg -&gt; RealReg -&gt; Ordering
RealReg -&gt; RealReg -&gt; RealReg
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: RealReg -&gt; RealReg -&gt; RealReg
$cmin :: RealReg -&gt; RealReg -&gt; RealReg
max :: RealReg -&gt; RealReg -&gt; RealReg
$cmax :: RealReg -&gt; RealReg -&gt; RealReg
&gt;= :: RealReg -&gt; RealReg -&gt; Bool
$c&gt;= :: RealReg -&gt; RealReg -&gt; Bool
&gt; :: RealReg -&gt; RealReg -&gt; Bool
$c&gt; :: RealReg -&gt; RealReg -&gt; Bool
&lt;= :: RealReg -&gt; RealReg -&gt; Bool
$c&lt;= :: RealReg -&gt; RealReg -&gt; Bool
&lt; :: RealReg -&gt; RealReg -&gt; Bool
$c&lt; :: RealReg -&gt; RealReg -&gt; Bool
compare :: RealReg -&gt; RealReg -&gt; Ordering
$ccompare :: RealReg -&gt; RealReg -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-154"></span><span>        </span><span id="local-6989586621680935993"><span class="annot"><span class="annottext">getUnique :: RealReg -&gt; Unique
</span><a href="#local-6989586621680935993"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680935992"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935992"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-155"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935992"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-156"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621680935991"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935991"><span class="hs-identifier hs-var">i</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegSingleUnique"><span class="hs-identifier hs-var">mkRegSingleUnique</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935991"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-157"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span> </span><span id="local-6989586621680935989"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935989"><span class="hs-identifier hs-var">r1</span></a></span></span><span> </span><span id="local-6989586621680935988"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935988"><span class="hs-identifier hs-var">r2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegPairUnique"><span class="hs-identifier hs-var">mkRegPairUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935989"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; RegNo -&gt; RegNo
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><span class="hs-number">65536</span></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; RegNo -&gt; RegNo
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935988"><span class="hs-identifier hs-var">r2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680935982"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-160"></span><span>        </span><span id="local-6989586621680935981"><span class="annot"><span class="annottext">ppr :: RealReg -&gt; SDoc
</span><a href="#local-6989586621680935981"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680935980"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935980"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-161"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935980"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-162"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621680935979"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935979"><span class="hs-identifier hs-var">i</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%r&quot;</span></span><span>  </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935979"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-163"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span> </span><span id="local-6989586621680935977"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935977"><span class="hs-identifier hs-var">r1</span></a></span></span><span> </span><span id="local-6989586621680935976"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935976"><span class="hs-identifier hs-var">r2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%r(&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935977"><span class="hs-identifier hs-var">r1</span></a></span><span>
</span><span id="line-164"></span><span>                                           </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#vbar"><span class="hs-identifier hs-var">vbar</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935976"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;)&quot;</span></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Platform.Reg.html#regNosOfRealReg"><span class="hs-identifier hs-type">regNosOfRealReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-167"></span><span id="regNosOfRealReg"><span class="annot"><span class="annottext">regNosOfRealReg :: RealReg -&gt; [RegNo]
</span><a href="GHC.Platform.Reg.html#regNosOfRealReg"><span class="hs-identifier hs-var hs-var">regNosOfRealReg</span></a></span></span><span> </span><span id="local-6989586621680935974"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935974"><span class="hs-identifier hs-var">rr</span></a></span></span><span>
</span><span id="line-168"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935974"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-169"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621680935973"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935973"><span class="hs-identifier hs-var">r1</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935973"><span class="hs-identifier hs-var">r1</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-170"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span>   </span><span id="local-6989586621680935972"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935972"><span class="hs-identifier hs-var">r1</span></a></span></span><span> </span><span id="local-6989586621680935971"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935971"><span class="hs-identifier hs-var">r2</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935972"><span class="hs-identifier hs-var">r1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935971"><span class="hs-identifier hs-var">r2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.Platform.Reg.html#realRegsAlias"><span class="hs-identifier hs-type">realRegsAlias</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-174"></span><span id="realRegsAlias"><span class="annot"><span class="annottext">realRegsAlias :: RealReg -&gt; RealReg -&gt; Bool
</span><a href="GHC.Platform.Reg.html#realRegsAlias"><span class="hs-identifier hs-var hs-var">realRegsAlias</span></a></span></span><span> </span><span id="local-6989586621680935970"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935970"><span class="hs-identifier hs-var">rr1</span></a></span></span><span> </span><span id="local-6989586621680935969"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935969"><span class="hs-identifier hs-var">rr2</span></a></span></span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[RegNo] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">([RegNo] -&gt; Bool) -&gt; [RegNo] -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[RegNo] -&gt; [RegNo] -&gt; [RegNo]
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intersect"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealReg -&gt; [RegNo]
</span><a href="GHC.Platform.Reg.html#regNosOfRealReg"><span class="hs-identifier hs-var">regNosOfRealReg</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935970"><span class="hs-identifier hs-var">rr1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealReg -&gt; [RegNo]
</span><a href="GHC.Platform.Reg.html#regNosOfRealReg"><span class="hs-identifier hs-var">regNosOfRealReg</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935969"><span class="hs-identifier hs-var">rr2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- | A register, either virtual or real</span><span>
</span><span id="line-179"></span><span class="hs-keyword">data</span><span> </span><span id="Reg"><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-var">Reg</span></a></span></span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="RegVirtual"><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-var">RegVirtual</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RegReal"><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-var">RegReal</span></a></span></span><span>    </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-182"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680935961"><span id="local-6989586621680935965"><span class="annot"><span class="annottext">Reg -&gt; Reg -&gt; Bool
(Reg -&gt; Reg -&gt; Bool) -&gt; (Reg -&gt; Reg -&gt; Bool) -&gt; Eq Reg
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Reg -&gt; Reg -&gt; Bool
$c/= :: Reg -&gt; Reg -&gt; Bool
== :: Reg -&gt; Reg -&gt; Bool
$c== :: Reg -&gt; Reg -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680935938"><span id="local-6989586621680935940"><span id="local-6989586621680935943"><span id="local-6989586621680935946"><span id="local-6989586621680935949"><span id="local-6989586621680935953"><span id="local-6989586621680935957"><span class="annot"><span class="annottext">Eq Reg
Eq Reg
-&gt; (Reg -&gt; Reg -&gt; Ordering)
-&gt; (Reg -&gt; Reg -&gt; Bool)
-&gt; (Reg -&gt; Reg -&gt; Bool)
-&gt; (Reg -&gt; Reg -&gt; Bool)
-&gt; (Reg -&gt; Reg -&gt; Bool)
-&gt; (Reg -&gt; Reg -&gt; Reg)
-&gt; (Reg -&gt; Reg -&gt; Reg)
-&gt; Ord Reg
Reg -&gt; Reg -&gt; Bool
Reg -&gt; Reg -&gt; Ordering
Reg -&gt; Reg -&gt; Reg
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: Reg -&gt; Reg -&gt; Reg
$cmin :: Reg -&gt; Reg -&gt; Reg
max :: Reg -&gt; Reg -&gt; Reg
$cmax :: Reg -&gt; Reg -&gt; Reg
&gt;= :: Reg -&gt; Reg -&gt; Bool
$c&gt;= :: Reg -&gt; Reg -&gt; Bool
&gt; :: Reg -&gt; Reg -&gt; Bool
$c&gt; :: Reg -&gt; Reg -&gt; Bool
&lt;= :: Reg -&gt; Reg -&gt; Bool
$c&lt;= :: Reg -&gt; Reg -&gt; Bool
&lt; :: Reg -&gt; Reg -&gt; Bool
$c&lt; :: Reg -&gt; Reg -&gt; Bool
compare :: Reg -&gt; Reg -&gt; Ordering
$ccompare :: Reg -&gt; Reg -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="annot"><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-type">regSingle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-185"></span><span id="regSingle"><span class="annot"><span class="annottext">regSingle :: RegNo -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var hs-var">regSingle</span></a></span></span><span> </span><span id="local-6989586621680935937"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935937"><span class="hs-identifier hs-var">regNo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-var">RegReal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegNo -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#realRegSingle"><span class="hs-identifier hs-var">realRegSingle</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935937"><span class="hs-identifier hs-var">regNo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="annot"><a href="GHC.Platform.Reg.html#realRegSingle"><span class="hs-identifier hs-type">realRegSingle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-188"></span><span id="realRegSingle"><span class="annot"><span class="annottext">realRegSingle :: RegNo -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#realRegSingle"><span class="hs-identifier hs-var hs-var">realRegSingle</span></a></span></span><span> </span><span id="local-6989586621680935936"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935936"><span class="hs-identifier hs-var">regNo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-var">RealRegSingle</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935936"><span class="hs-identifier hs-var">regNo</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.Platform.Reg.html#regPair"><span class="hs-identifier hs-type">regPair</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-191"></span><span id="regPair"><span class="annot"><span class="annottext">regPair :: RegNo -&gt; RegNo -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regPair"><span class="hs-identifier hs-var hs-var">regPair</span></a></span></span><span> </span><span id="local-6989586621680935935"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935935"><span class="hs-identifier hs-var">regNo1</span></a></span></span><span> </span><span id="local-6989586621680935934"><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935934"><span class="hs-identifier hs-var">regNo2</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-var">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">(RealReg -&gt; Reg) -&gt; RealReg -&gt; Reg
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo -&gt; RegNo -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-var">RealRegPair</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935935"><span class="hs-identifier hs-var">regNo1</span></a></span><span> </span><span class="annot"><span class="annottext">RegNo
</span><a href="#local-6989586621680935934"><span class="hs-identifier hs-var">regNo2</span></a></span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- We like to have Uniques for Reg so that we can make UniqFM and UniqSets</span><span>
</span><span id="line-195"></span><span class="hs-comment">-- in the register allocator.</span><span>
</span><span id="line-196"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-197"></span><span>        </span><span id="local-6989586621680935929"><span class="annot"><span class="annottext">getUnique :: Reg -&gt; Unique
</span><a href="#local-6989586621680935929"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680935928"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935928"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-198"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935928"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-199"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span id="local-6989586621680935927"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935927"><span class="hs-identifier hs-var">vr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VirtualReg -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935927"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-200"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span>    </span><span id="local-6989586621680935926"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935926"><span class="hs-identifier hs-var">rr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935926"><span class="hs-identifier hs-var">rr</span></a></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="hs-comment">-- | Print a reg in a generic manner</span><span>
</span><span id="line-203"></span><span class="hs-comment">--      If you want the architecture specific names, then use the pprReg</span><span>
</span><span id="line-204"></span><span class="hs-comment">--      function from the appropriate Ppr module.</span><span>
</span><span id="line-205"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680935923"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-206"></span><span>        </span><span id="local-6989586621680935920"><span class="annot"><span class="annottext">ppr :: Reg -&gt; SDoc
</span><a href="#local-6989586621680935920"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680935919"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935919"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-207"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935919"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-208"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span id="local-6989586621680935918"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935918"><span class="hs-identifier hs-var">vr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VirtualReg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935918"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-209"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span>    </span><span id="local-6989586621680935917"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935917"><span class="hs-identifier hs-var">rr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935917"><span class="hs-identifier hs-var">rr</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="annot"><a href="GHC.Platform.Reg.html#isRealReg"><span class="hs-identifier hs-type">isRealReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-213"></span><span id="isRealReg"><span class="annot"><span class="annottext">isRealReg :: Reg -&gt; Bool
</span><a href="GHC.Platform.Reg.html#isRealReg"><span class="hs-identifier hs-var hs-var">isRealReg</span></a></span></span><span> </span><span id="local-6989586621680935916"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935916"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-214"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935916"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-215"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-216"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Platform.Reg.html#takeRealReg"><span class="hs-identifier hs-type">takeRealReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span>
</span><span id="line-219"></span><span id="takeRealReg"><span class="annot"><span class="annottext">takeRealReg :: Reg -&gt; Maybe RealReg
</span><a href="GHC.Platform.Reg.html#takeRealReg"><span class="hs-identifier hs-var hs-var">takeRealReg</span></a></span></span><span> </span><span id="local-6989586621680935915"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935915"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-220"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935915"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-221"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span id="local-6989586621680935914"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935914"><span class="hs-identifier hs-var">rr</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; Maybe RealReg
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621680935914"><span class="hs-identifier hs-var">rr</span></a></span><span>
</span><span id="line-222"></span><span>        </span><span class="annot"><span class="annottext">Reg
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe RealReg
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="annot"><a href="GHC.Platform.Reg.html#isVirtualReg"><span class="hs-identifier hs-type">isVirtualReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-226"></span><span id="isVirtualReg"><span class="annot"><span class="annottext">isVirtualReg :: Reg -&gt; Bool
</span><a href="GHC.Platform.Reg.html#isVirtualReg"><span class="hs-identifier hs-var hs-var">isVirtualReg</span></a></span></span><span> </span><span id="local-6989586621680935913"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935913"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-227"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935913"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-228"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-229"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.Platform.Reg.html#takeVirtualReg"><span class="hs-identifier hs-type">takeVirtualReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-232"></span><span id="takeVirtualReg"><span class="annot"><span class="annottext">takeVirtualReg :: Reg -&gt; Maybe VirtualReg
</span><a href="GHC.Platform.Reg.html#takeVirtualReg"><span class="hs-identifier hs-var hs-var">takeVirtualReg</span></a></span></span><span> </span><span id="local-6989586621680935912"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935912"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-233"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935912"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-234"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe VirtualReg
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-235"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span id="local-6989586621680935911"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935911"><span class="hs-identifier hs-var">vr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VirtualReg -&gt; Maybe VirtualReg
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935911"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="hs-comment">-- | The patch function supplied by the allocator maps VirtualReg to RealReg</span><span>
</span><span id="line-239"></span><span class="hs-comment">--      regs, but sometimes we want to apply it to plain old Reg.</span><span>
</span><span id="line-240"></span><span class="hs-comment">--</span><span>
</span><span id="line-241"></span><span class="annot"><a href="GHC.Platform.Reg.html#liftPatchFnToRegReg"><span class="hs-identifier hs-type">liftPatchFnToRegReg</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span id="liftPatchFnToRegReg"><span class="annot"><span class="annottext">liftPatchFnToRegReg :: (VirtualReg -&gt; RealReg) -&gt; Reg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#liftPatchFnToRegReg"><span class="hs-identifier hs-var hs-var">liftPatchFnToRegReg</span></a></span></span><span> </span><span id="local-6989586621680935910"><span class="annot"><span class="annottext">VirtualReg -&gt; RealReg
</span><a href="#local-6989586621680935910"><span class="hs-identifier hs-var">patchF</span></a></span></span><span> </span><span id="local-6989586621680935909"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935909"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-243"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935909"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-244"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegVirtual"><span class="hs-identifier hs-type">RegVirtual</span></a></span><span> </span><span id="local-6989586621680935908"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935908"><span class="hs-identifier hs-var">vr</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; Reg
</span><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-var">RegReal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VirtualReg -&gt; RealReg
</span><a href="#local-6989586621680935910"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621680935908"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621680935909"><span class="hs-identifier hs-var">reg</span></a></span><span>
</span><span id="line-246"></span></pre></body></html>